<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <!-- <img v-bind:src="imgUrl" alt=""> -->

      <div v-for="item in imgArr"  :key="item"></div>
      <button v-show="index > 0" @click="index--">上一页</button>
      <button v-show="index < imgArr.length-1" @click="index++">下一页</button>
     <p><img v-bind:src="imgArr[index]" alt="" /></p>
     
    </div>
    <script src="js/vue.js"></script>
    <script>
      const app = new Vue({
        el: "#app",
        data: {
          // imgUrl:"img/截屏2024-08-26 09.15.20.png"
          // imgUrl:"img/截屏2024-08-26 09.15.26.png"
          index:0,
          imgArr: [
            "img/截屏2024-08-26 09.15.26.png",
            "img/截屏2024-08-26 09.15.20.png",
          ],
        },
      });
    </script>
  </body>
</html>
